package com.platform.config;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 资源配置
 *
 * @author 肖亮
 */
//@Component
@Deprecated
public class ResourceHandlerConfig implements WebMvcConfigurer {

	@Override
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		// web
		registry.addResourceHandler("/statics/**").addResourceLocations("classpath:/statics/");
		registry.addResourceHandler("/templates/**").addResourceLocations("classpath:/templates/");
		registry.addResourceHandler("login.html").addResourceLocations("classpath:/templates/");
		registry.addResourceHandler("index.html").addResourceLocations("classpath:/templates/");
		registry.addResourceHandler("main.html").addResourceLocations("classpath:/templates/");
		// swagger
		registry.addResourceHandler("doc.html").addResourceLocations("classpath:/statics/");
		registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/statics/swagger-ui/");

		// activiti
		registry.addResourceHandler("modeler.html").addResourceLocations("classpath:/statics/");
		registry.addResourceHandler("/diagram-viewer/**").addResourceLocations("classpath:/statics/diagram-viewer/");
		registry.addResourceHandler("/editor-app/**").addResourceLocations("classpath:/statics/editor-app/");
	}
}
